/**
 * Copyright 2010 - YangJiandong(chunquedong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 
 * ChunMap是开源软件。你可以自由复制、传播本项目的下载包文件，但必须保持其完整性。
 * 我们不用对使用中的风险及由此造成的损失承担任何责任。
 * 详细情况请见《ChunMap许可协议》。
 * 
 * 想了解更多有关ChunMap的信息，请访问http://code.google.com/p/chunmap/
 * 
 * 下面此段程序作者YangJianDong(chunquedong)
 * 最后修改时间2010.7.17
 */
package chunmap.view;

import chunmap.model.coord.Position;
import chunmap.model.coord.Transform;
import chunmap.model.elem.Envelope;

public interface View {
	/// <summary>
    /// 比例尺
    /// </summary>
	public double getScale();
	public void setScale(double s);
    /// <summary>
    /// 当前区域
    /// </summary>
	public Envelope getViewEnvelop();
	public void setViewEnvelop(Envelope env);
    /// <summary>
    /// 当前视图中心点
    /// </summary>
	public Position getCenter();
	public void setCenter(Position p);
    /// <summary>
    /// 屏幕宽度
    /// </summary>
    /// <returns></returns>
	public int getWidth();
    /// <summary>
    /// 屏幕高度
    /// </summary>
    /// <returns></returns>
	public int getHeight();

    //------------------------------------------------------------------------坐标变换

	public Transform screen2World();
	public double x2World(double x);
	public double y2World(double y);

	public Transform world2Screen();
	public double x2Screen(double x);
	public double y2Screen(double y);

	public double dis2Screen(double d);
	public double dis2World(double d);

    //------------------------------------------------------------------------

	Envelope getBufferEnvelop();
	void resetSize(int width, int height);
    /// <summary>
    /// 缩放操作
    /// </summary>
    /// <param name="s"></param>
    /// <param name="x"></param>
    /// <param name="y"></param>
	public void zoom(double s, double x, double y);
}
